home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / Makefile.in < prev    next >
Makefile  |  1992-09-11  |  8KB  |  247 lines

  1. #
  2. # Makefile for directory with subdirs to build.
  3. #   Copyright (C) 1990, 1991 Cygnus Support
  4. #
  5. # This file is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16. #
  17. # Last Mod Thu Oct 10 00:24:41 PDT 1991, by rich@cygnus.com
  18. #
  19. # $Id: Makefile.in,v 1.43 1991/10/16 19:54:30 gnu Exp $
  20.  
  21. srcdir = .
  22. destdir = /usr/local
  23.  
  24. SHELL=/bin/sh
  25.  
  26. #CC = gcc -b$(target) # -B$(srcdir)/../gas/Host-$(host)/Target-$(target)/
  27. #CFLAGS = -g -nostdinc -nostdlib -I- -I/usr/local/lib/gcc/$(target)/1.92/include -I$(srcdir) -I$(srcdir)/../include -I$(OSINCLUDE)
  28.  
  29. RANLIB = ranlib
  30. AR = ar
  31. AR_FLAGS = cq
  32. BISONPATH = 
  33.  
  34. BISON = `if [ -d $(unsubdir)/../bison ] ; \
  35.     then echo \`pwd\`/$(unsubdir)/../bison$(subdir)/bison -L \`pwd\`/$(unsubdir)/../bison/ ; \
  36.     else echo yacc ; fi`
  37.  
  38. SUBDIRS = libiberty readline bfd gdb binutils ld gas gcc gnulib
  39. OTHERS = 
  40.  
  41. #### host and target specific makefile fragments come in here.
  42. ###
  43.  
  44. all:
  45.     $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
  46.  
  47. subdir_do: force
  48.     for i in $(DODIRS); do \
  49.         if [ -d $(unsubdir)/$$i -o -d $(unsubdir)/$$i.$(target) ] ; then \
  50.             if (cd $(unsubdir)/$$i`if [ -d $(unsubdir)/$$i.$(target) ] ; \
  51.                 then echo .$(target) ; fi`$(subdir); \
  52.                 $(MAKE) \
  53.                     "against=$(against)" \
  54.                     "AR=$(AR)" \
  55.                     "CC=$(CC)" \
  56.                     "AR_FLAGS=$(AR_FLAGS)" \
  57.                     "RANLIB=$(RANLIB)" \
  58.                     "LOADLIBES=$(LOADLIBES)" \
  59.                     "LDFLAGS=$(LDFLAGS)" \
  60.                     "BISON=$(BISON)" $(DO)) ; then true ; \
  61.             else exit 1 ; fi ; \
  62.         else true ; fi ; \
  63.     done
  64.  
  65. bootstrap:
  66.     $(MAKE) all
  67.     $(MAKE) stage1
  68.     $(MAKE) pass "stagepass=stage1"
  69.     $(MAKE) stage2
  70.     $(MAKE) pass "stagepass=stage2"
  71.     $(MAKE) comparison
  72.  
  73. bootstrap2:
  74.     $(MAKE) pass "stagepass=stage1"
  75.     $(MAKE) stage2
  76.     $(MAKE) pass "stagepass=stage2"
  77.     $(MAKE) comparison
  78.  
  79. bootstrap3:
  80.     $(MAKE) pass "stagepass=stage2"
  81.     $(MAKE) comparison
  82.  
  83. pass:
  84.     cp $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  85.                 then echo .$(target) ; fi`/gstdarg.h $(unsubdir)/gas/stdarg.h
  86.     $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" \
  87.         "CC=`pwd`/$(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  88.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/gcc \
  89.         -O \
  90.         -B`pwd`/$(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  91.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
  92.         -B`pwd`/$(unsubdir)/gas`if [ -d $(unsubdir)/gas.$(target) ] ; \
  93.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
  94.         -B`pwd`/$(unsubdir)/ld`if [ -d $(unsubdir)/ld.$(target) ] ; \
  95.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/" \
  96.         "AR=`pwd`/$(unsubdir)/binutils`if [ -d $(unsubdir)/binutils.$(target) ] ; \
  97.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ar" \
  98.         "RANLIB=`pwd`/$(unsubdir)/binutils`if [ -d $(unsubdir)/binutils.$(target) ] ; \
  99.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ranlib" \
  100.         "LOADLIBES=`pwd`/$(unsubdir)/gnulib`if [ -d $(unsubdir)/binutils.$(target) ] ; \
  101.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/gnulib.a /lib/libc.a" \
  102.         "LDFLAGS=-nostdlib /lib/crt0.o \
  103.         -L`pwd`/$(unsubdir)/gnulib`if [ -d $(unsubdir)/gnulib.$(target) ] ; \
  104.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/ \
  105.         -B`pwd`/$(unsubdir)/ld`if [ -d $(unsubdir)/ld.$(target) ] ; \
  106.         then echo .$(target) ; fi`$(subdir)/$(stagepass)/"
  107.  
  108.  
  109. stage1:
  110.     $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
  111.  
  112. stage2:
  113.     $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
  114.  
  115. stage3:
  116.     $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
  117.  
  118. stage4:
  119.     $(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
  120.  
  121. against=stage2
  122.  
  123. comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
  124.  
  125. de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
  126. de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
  127. de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
  128. de-stage4:; $(MAKE) subdir_do DO=de-stage4 "DODIRS=$(SUBDIRS)"
  129.  
  130. clean:
  131.     rm -rf *.a TEMP errs core *.o *~ \#* TAGS *.E
  132.     $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS) $(OTHERS)"
  133.  
  134. install: install-dirs install-fixed-includes
  135.     $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS) $(OTHERS)"
  136.  
  137. # The "else true" stuff is for Ultrix; the shell returns the exit code
  138. # of the "if" command, if no commands are run in the "then" or "else" part,
  139. # causing Make to quit.
  140. install-dirs: force
  141.     - mkdir $(destdir)
  142.     - mkdir $(destdir)/H-$(host_alias)
  143.     - mkdir $(destdir)/H-$(host_alias)/T-independent
  144.     - mkdir $(destdir)/H-$(host_alias)/T-independent/bin
  145.     - mkdir $(destdir)/H-$(host_alias)/T-independent/lib
  146.     - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)
  147.     - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)/bin
  148.     - mkdir $(destdir)/H-$(host_alias)/T-$(target_alias)/lib
  149.     - mkdir $(destdir)/H-independent
  150.     - mkdir $(destdir)/H-independent/include
  151.     - mkdir $(destdir)/H-independent/doc
  152.     - mkdir $(destdir)/H-independent/man
  153.     - mkdir $(destdir)/H-independent/man/man1
  154.     - mkdir $(destdir)/H-independent/man/man2
  155.     - mkdir $(destdir)/H-independent/man/man3
  156.     - mkdir $(destdir)/H-independent/man/man4
  157.     - mkdir $(destdir)/H-independent/man/man5
  158.     - mkdir $(destdir)/H-independent/man/man6
  159.     - mkdir $(destdir)/H-independent/man/man7
  160.     - mkdir $(destdir)/H-independent/man/man8
  161.     if [ -d $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  162.                 then echo .$(target) ; fi`$(subdir) ] ; then \
  163.         (cd  $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  164.                     then echo .$(target) ; fi`$(subdir) ; \
  165.                 $(MAKE) install-dir) ; \
  166.     else true; \
  167.     fi
  168.  
  169. install-fixed-includes: force
  170.     if [ -d $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  171.                 then echo .$(target) ; fi`$(subdir) ] ; then \
  172.         (cd  $(unsubdir)/gcc`if [ -d $(unsubdir)/gcc.$(target) ] ; \
  173.                     then echo .$(target) ; fi`$(subdir) ; \
  174.                 $(MAKE) install-fixed-includes) ; \
  175.     else true; \
  176.     fi
  177.  
  178. etags tags: TAGS
  179.  
  180. TAGS: FORCE
  181.     etags `$(MAKE) ls`
  182.  
  183. ls:
  184.     @echo Makefile
  185.     @for i in $(SUBDIRS); \
  186.     do \
  187.         (cd $$i; \
  188.             pwd=`pwd`; \
  189.             wd=`basename $$pwd`; \
  190.             for j in `$(MAKE) ls`; \
  191.             do \
  192.                 echo $$wd/$$j; \
  193.             done) \
  194.     done
  195.  
  196. force:
  197.  
  198. # with the gnu make, this is done automatically.
  199.  
  200. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  201.     $(SHELL) ./config.status
  202.  
  203. #
  204. # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
  205.  
  206. DEVO_SUPPORT= README README.configure Makefile.in configure configure.in \
  207.     config.sub config
  208. GDB_SUPPORT_DIRS= bfd include libiberty readline
  209. GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS) texinfo/fsf/texinfo.tex
  210.  
  211. setup-dirs: force_update
  212.     ./configure sun4
  213.     make clean
  214.     ./configure -rm sun4
  215.     chmod og=u `find $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
  216.  
  217. bfd.ilrt.tar.Z: setup-dirs
  218.     rm -f bfd.ilrt.tar.Z
  219.     tar cf - $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) \
  220.         | compress -v >bfd.ilrt.tar.Z
  221.  
  222. gdb.tar.Z: setup-dirs
  223.     (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir)
  224.     $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
  225.  
  226. make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/fsf/texinfo.tex
  227.     rm -rf proto-toplev; mkdir proto-toplev
  228.     ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
  229.     (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
  230.         ln -s ../$$i . ; \
  231.     done)
  232.     mkdir proto-toplev/texinfo
  233.     mkdir proto-toplev/texinfo/fsf
  234.     ln -s ../../../texinfo/fsf/texinfo.tex proto-toplev/texinfo/fsf/
  235.     chmod og=u `find proto-toplev -print`
  236.     (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
  237.         echo "==> Making gdb-$$VER.tar.Z"; \
  238.         ln -s proto-toplev gdb-$$VER; \
  239.         tar cfh - gdb-$$VER \
  240.         | compress -v >gdb-$$VER.tar.Z)
  241.  
  242. force_update:
  243.  
  244. # end of Makefile.in
  245.